﻿namespace dPet.Infrastructure.EntityFramework.ModelConfigurations
{
	using dPet.Domain.Models;
	using Hangerd.EntityFramework;

	public class ServiceItemConfig : EntityTypeConfigBase<ServiceItem>
	{
		public ServiceItemConfig()
		{
			Property(si => si.HospitalId)
				.IsRequired()
				.HasMaxLength(32);

			Property(si => si.Name)
				.IsRequired()
				.HasMaxLength(20);

			HasMany(si => si.SKUProperties)
				.WithMany(ssp => ssp.ServiceItems);
		}
	}
}
